package com.zhou.configclient;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zx
 * @date 2019/7/22 10:59
 */
@RestController
@RequestMapping("/hello")
public class HelloController {
    @Value("${info.profile}")
    private String profile;

    @GetMapping("/get")
    public Map<String, Object> getConfigFromGit() {
        Map<String, Object> map = new HashMap<>(16);
        map.put("profile", profile);
        return map;
    }
}
